package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qf.mapper.DtsOrderGoodsMapper;
import com.qf.pojo.DtsGoodsAttribute;
import com.qf.pojo.DtsOrderGoods;
import com.qf.service.DtsGoodsOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 千峰教育
 * @Company http://www.mobiletrain.org/
 * @Version 1.0
 */
@Service
public class DtsGoodsOrderServiceImpl implements DtsGoodsOrderService {

    @Autowired
    DtsOrderGoodsMapper orderGoodsMapper;

    @Override
    public int findCountByGid(Integer id) {
        LambdaQueryWrapper<DtsOrderGoods> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(DtsOrderGoods::getDeleted, false);
        wrapper.eq(DtsOrderGoods::getGoodsId, id);
        return orderGoodsMapper.selectCount(wrapper);
    }


}
